//
//  InStationIetterViewController.m
//  PlayerWorld
//
//  Created by 1 on 16/5/4.
//  Copyright © 2016年 刘成. All rights reserved.
//
#define UISCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#import "InStationIetterViewController.h"

@interface InStationIetterViewController ()<UITextViewDelegate>

@end

@implementation InStationIetterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"站内信详情";
    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    
    // 状态栏(statusbar)
    CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame];
    
    // 导航栏（navigationbar）
    CGRect rectNav = self.navigationController.navigationBar.frame;
    
    UILabel *inStationLetterLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, rectStatus.size.height+rectNav.size.height, UISCREEN_WIDTH, 80)];
    inStationLetterLabel.text = @"    【网站公告】 紫金国际五分彩、二分彩、一分彩\n    恢复销售以及公彩开市通知";
    inStationLetterLabel.backgroundColor = [UIColor whiteColor];
    inStationLetterLabel.font = [UIFont systemFontOfSize:14];
    inStationLetterLabel.textColor = [UIColor grayColor];
//    inStationLetterLabel.lineBreakMode = UILineBreakModeWordWrap;
    inStationLetterLabel.numberOfLines = 0;
    [self.view addSubview:inStationLetterLabel];
    
    UITextView *inStationLettertextView = [[UITextView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(inStationLetterLabel.frame)+1, UISCREEN_WIDTH, UISCREEN_HEIGHT-CGRectGetMaxY(inStationLetterLabel.frame)-1)];
    inStationLettertextView.textColor = [UIColor grayColor];//设置textview里面的字体颜色
    
    inStationLettertextView.font = [UIFont systemFontOfSize:14.0];//设置字体名字和字体大小
    
    inStationLettertextView.delegate = self;//设置它的委托方法
    
    inStationLettertextView.backgroundColor = [UIColor whiteColor];//设置它的背景颜色
    
    
    
    inStationLettertextView.text = @"尊敬的用户：\n\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n黄金大螺丝刀把考试的把控大事发生啊实打实的\n";//设置它显示的内容
    
    inStationLettertextView.returnKeyType = UIReturnKeyDefault;//返回键的类型
    
    inStationLettertextView.keyboardType = UIKeyboardTypeDefault;//键盘类型
    
    inStationLettertextView.scrollEnabled = YES;//是否可以拖动
    
    inStationLettertextView.autoresizingMask = UIViewAutoresizingFlexibleHeight;//自适应高度
    
    [self.view addSubview:inStationLettertextView];//加入到整个页面中

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
